/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.aptech.search;

import com.aptech.entity.CompanyType;
import com.aptech.session.CompanyTypeFacadeLocal;
import java.util.List;
import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;

/**
 *
 * @author DucMinh
 */
@ManagedBean
@RequestScoped
public class SearchCompanyTypeBean {
    @EJB
    private CompanyTypeFacadeLocal companyTypeFacade;

    /** Creates a new instance of SearchCompanyTypeBean */
    public SearchCompanyTypeBean() {
    }
    
    private String field;
    private Object value;
    private List<CompanyType>companylist;

    public List<CompanyType> getCompanylist() {
        return companylist;
    }

    public void setCompanylist(List<CompanyType> companylist) {
        this.companylist = companylist;
    }

    public String getField() {
        return field;
    }

    public void setField(String field) {
        this.field = field;
    }

    public Object getValue() {
        return value;
    }

    public void setValue(Object value) {
        this.value = value;
    }
    public String searchcompanytype()
    {
        companylist=companyTypeFacade.searchCompanytype(field, value);
        return "ResultCompanyType";
    }
    
}
